<?php



namespace App\Http\Requests\Company;

use App\Http\Requests\ApiV2\BaseRequest;
use Illuminate\Support\Facades\Auth;
use App\Services\Business\Models\MyCategory;


class CoverRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'media_id' => 'required',
            'url' => 'required',

        ];
    }

    public function messages()
    {
        return [
            'media_id.required' => __('请输入图片id'),
            'url.required' => __('请输入图片链接地址'),


        ];
    }

    public function filldata()
    {


        return [
            'title' => (string)$this->input('title'),
            'media_id'=>(string)$this->input('media_id'),
            'url'=>(string)$this->input('url'),

        ];
    }

}
